//Define.js


g_ReplayInfo = new Object();

QPName = 'KuaiQiGame';

LOG_NET_DATA = true;
CREATE_CLUB_CHECK_CODE = 0;

cc.VERSION_PLAZA     =   0x6070001;

// 数目定义
window.g_NoticeShowCnt = 0;
window.MAX_GET_COUNT_GPS = 3;

// 连接配置
LOGIN_SERVER_IP = '192.168.1.7';//'192.168.1.7';//'119.45.216.108';//正式服
WEB_HEAD = 'http://';
LOGIN_SERVER_PORT = 8600;
PHP_PORT = 8080;
BATTLE_SHARE_URL = WEB_HEAD + LOGIN_SERVER_IP + ':' + PHP_PORT + '/Share';
PHP_HOME = WEB_HEAD + (G.isLocal ? G.ip : G.ip_line) + ':' + PHP_PORT;


//分享链接
WXHEAD = 'http://www.baidu.com/game?Jump=1&state='
SHARE_URL_BASE = 'http://www.baidu.com/';


// 闲聊
XL_APPID = 'XXXXXXXXXX';
XL_SECRET = 'XXXXXXXXXX';


// 语音
GVOICE_APPID = "XXXXXXXXXX";
GVOICE_APPKEY = "XXXXXXXXXX";


// 客服微信
WX_SERVICE = 'XXXXXXXXXX';

//登录平台
PLSTFROM_OTHER = 0;
PLSTFROM_WX = 1;
PLSTFROM_XL = 2;
PLSTFROM_QQ = 3;
LOGIN_PLSTFROM = PLSTFROM_OTHER

GETCODETIME = 60;                       //获取验证码等待时间

/////////////////////////////////////////////////////////////////

SCENE_WIGHT_BASE = 720;
SCENE_HEIGHT_BASE = 1280;
SCENE_WIGHT = 720;
SCENE_HEIGHT = 1280;

Alert_Yes = 1;
Alert_YesNo = 3;
Alert_All = 7;

enXLeft = 1; //左对齐
enXCenter = 2; //中对齐
enXRight = 3; //右对齐

ShowLobbyClub = 0;
ClubPara = null;
ClubLvStr = new Array("路人","黑名单","申请中","成员","4","5","6","合伙人","管理","部长","盟主");
ClubSelectGame = 0; //俱乐部选中的游戏
//场景资源预加载
g_BGGameSF=null;
g_BGLobbySF=null;
g_SelectClubID = 0;

GameList = new Object();
KindID_KWX = 62007;
KindID_RF = 60001;
GameKindList = [KindID_RF, KindID_KWX];
GameList[KindID_KWX] = '卡五星';
GameList[KindID_RF] = '跑得快';


//重新登录
g_HasNewMail = false;
gReLogin = false;
g_Login = null;
g_Lobby = null;
g_Table = null;

Lobby_PageMsg_Name = 'PageMsg';
Lobby_PageRecord_Name = 'PageRecord';
Lobby_PageGame_Name = 'PageGame';
Lobby_PageStore_Name = 'PageStore';
Lobby_PageSelf_Name = 'PageSelf';

//测试玩家
UR_GAME_TEST_USER	=		0x20000000;

//////////////////////////////////////////////////////////////////////////////////

//数值定义

MAX_PATH = 260;                 //最大路径
MAX_CLUB_PART_ROOM = 20;        //俱乐部最大房间

INVALD_CHAIR = 0xFFFF;

CARD_WIGTH             =               174;
CARD_HEIGHT            =               236;

//头像大小
FACE_CX = 48; //头像宽度
FACE_CY = 48; //头像高度

//长度定义
LEN_LESS_ACCOUNTS=			6;									//最短帐号
LEN_LESS_NICKNAME=			6;									//最短昵称
LEN_LESS_PASSWORD=			6;									//最短密码

//人数定义
MAX_CHAIR	=				100;									//最大椅子
MAX_TABLE	=				512;									//最大桌子
MAX_COLUMN	=				32;									//最大列表
MAX_ANDROID	=				256;									//最大机器
MAX_PROPERTY	=			128;									//最大道具
MAX_WHISPER_USER		=	16;									//最大私聊

//列表定义
MAX_KIND			=		128;									//最大类型
MAX_SERVER			=		1024;								//最大房间

//参数定义
INVALID_CHAIR		=		0xFFFF;								//无效椅子
INVALID_TABLE		=		0xFFFF;								//无效桌子

//税收定义
REVENUE_BENCHMARK	=		0;								    //税收起点
REVENUE_DENOMINATOR	=		1000;								//税收分母

LinkInfo = null;
function getLinkInfo() { //输入参数名称
    try {
        if (!LinkInfo) {
            LinkInfo = new Object();
            var state = getQueryString("state"); //
            if (state && state != '') {
                var obj = JSON.parse(state);
                if (obj.LinkRoom) LinkInfo.LinkRoom = obj.LinkRoom.split(',');
            }
            if (LinkInfo.LinkRoom == null) LinkInfo.LinkRoom = [0, 0, 0];
        }
    } catch (error) {
        if(console.error) console.error(error);
        else  console.log(error);
    }
}


//////////////////////////////////////////////////////////////////////////////////
CREATE_TYPE_NORMAL			= 0;								//创建房间类型 正常房间
CREATE_TYPE_CLUB			= 1;								//创建房间类型 俱乐部房间
CREATE_TYPE_CLUB_AUTO		= 2;								//创建房间类型 俱乐部房间
CREATE_TYPE_DK				= 3;								//创建房间类型 代开房间
CREATE_TYPE_WORLD			= 4;								//创建房间类型 世界房间
CREATE_TYPE_RULES			= 5;								//创建房间类型 只创建规则
CREATE_TYPE_COUNT			= 6;								//房间类型数量

SERVER_RULES_AA				= 0X00000001;						//AA支付
SERVER_RULES_DK				= 0X00000002;						//代开房间
SERVER_RULES_SCORE			= 0X00000004;						//积分房间
SERVER_RULES_GOLD			= 0X00000008;						//金币房间
SERVER_RULES_WORLD			= 0X00000010;						//世界房间

ROOM_OPERATE_RETURN			= 0x0001;							// 返回原来的房间
ROOM_OPERATE_LEAVE			= 0x0002;							// 退出原来的房间
ROOM_OPERATE_DISS			= 0x0004;							// 解散原来的房间


//系统参数

//游戏状态
GAME_STATUS_FREE	=		0;									//空闲状态
GAME_STATUS_PLAY	=		100;								//游戏状态
GAME_STATUS_WAIT	=		200;									//等待状态

//系统参数
LEN_USER_CHAT		=		128;								//聊天长度
TIME_USER_CHAT		=		1;									//聊天间隔
TRUMPET_MAX_CHAR     =      128;								//喇叭长度

//////////////////////////////////////////////////////////////////////////////////
//索引质数

//列表质数
PRIME_TYPE		=			11;									//种类数目
PRIME_KIND		=			53;									//类型数目
PRIME_NODE		=			101;								//节点数目
PRIME_PAGE		=			53;									//自定数目
PRIME_SERVER	=			1009;								//房间数目

//人数质数
PRIME_SERVER_USER	=		503;								//房间人数
PRIME_ANDROID_USER	=		503;								//机器人数
PRIME_PLATFORM_USER	=		100003;							    //平台人数

//////////////////////////////////////////////////////////////////////////////////
//数据长度

//资料数据
LEN_MD5				=		33;									//加密密码
LEN_USERNOTE		=		32;									//备注长度
LEN_ACCOUNTS		=		32;									//帐号长度
LEN_NICKNAME		=		32;									//昵称长度
LEN_PASSWORD		=		33;									//密码长度
LEN_GROUP_NAME		=		32;									//社团名字
LEN_UNDER_WRITE		=		32;									//个性签名
LEN_IP              =       16;
//数据长度
LEN_QQ				=		16;									//Q Q 号码
LEN_EMAIL			=		33;									//电子邮件
LEN_USER_NOTE		=		256;									//用户备注
LEN_SEAT_PHONE		=		33;									//固定电话
LEN_MOBILE_PHONE	=		12;									//移动电话
LEN_PASS_PORT_ID	=		19;									//证件号码
LEN_COMPELLATION	=		16;									//真实名字
LEN_DWELLING_PLACE	=		128;									//联系地址
LEN_WEEK			=		7									//星期长度

//机器标识
LEN_NETWORK_ID		=		13;									//网卡长度
LEN_MACHINE_ID		=		33;									//序列长度

//列表数据
LEN_TYPE			=		32;									//种类长度
LEN_KIND			=		32;									//类型长度
LEN_NODE			=		32;									//节点长度
LEN_PAGE			=		32;									//定制长度
LEN_SERVERADDR		=		32;									//房间地址场地
LEN_SERVER			=		32;									//房间长度
LEN_PROCESS			=		32;									//进程长度
LEN_NAME			=		32;

LEN_STR             =       16;                                 //字符串

//////////////////////////////////////////////////////////////////////////////////

//用户关系
CP_NORMAL		=			0;									//未知关系
CP_FRIEND		=			1;									//好友关系
CP_DETEST		=			2;									//厌恶关系
CP_SHIELD		=		    3;									//屏蔽聊天

//////////////////////////////////////////////////////////////////////////////////

//性别定义
GENDER_FEMALE		=		0;									//女性性别
GENDER_MANKIND		=		1;									//男性性别

//////////////////////////////////////////////////////////////////////////////////

//游戏模式
GAME_GENRE_GOLD		=		0x0001;								//金币类型
GAME_GENRE_SCORE	=		0x0002;								//点值类型
GAME_GENRE_MATCH	=		0x0004;								//比赛类型
GAME_GENRE_EDUCATE	=		0x0008;								//训练类型
GAME_GENRE_PERSONAL =       0x0010;
GAME_GENRE_PERSONAL_S    =       0x0020;
GAME_GENRE_PERSONAL_G    =       0x0040;

//////////////////////////////////////////////////////////////////////////////////

//用户状态
US_NULL			=			0x00;								//没有状态
US_FREE			=			0x01;								//站立状态
US_SIT			=			0x02;								//坐下状态
US_READY		=			0x03;								//同意状态
US_LOOKON		=			0x04;								//旁观状态
US_PLAYING		=			0x05;								//游戏状态
US_OFFLINE		=			0x06;								//断线状态
//////////////////////////////////////////////////////////////////////////////////


//比赛状态
MS_NULL			=			0x00;								//没有状态
MS_SIGNUP		=			0x01;								//报名状态
MS_MATCHING		=			0x02;								//比赛状态
MS_OUT			=			0x03;								//淘汰状态

//////////////////////////////////////////////////////////////////////////////////

//房间规则
SRL_LOOKON		=			0x00000001;							//旁观标志
SRL_OFFLINE		=			0x00000002;							//断线标志
SRL_SAME_IP		=			0x00000004;							//同网标志

//房间规则
SRL_ROOM_CHAT		=		0x00000100;							//聊天标志
SRL_GAME_CHAT		=		0x00000200;							//聊天标志
SRL_WISPER_CHAT		=		0x00000400;							//私聊标志
SRL_HIDE_USER_INFO	=		0x00000800;							//隐藏标志

//////////////////////////////////////////////////////////////////////////////////
//数据库定义

DB_ERROR 			=		-1;  								//处理失败
DB_SUCCESS 			=		0;  									//处理成功
DB_NEEDMB 			=		18; 									//处理失败


//////////////////////////////////////////////////////////////////////////////////
//设备类型
DEVICE_TYPE_PC          =     0x00;                                //PC
DEVICE_TYPE_ANDROID     =     0x10;                                //Android
DEVICE_TYPE_ITOUCH      =     0x20;                                //iTouch
DEVICE_TYPE_IPHONE      =     0x40;                                //iPhone
DEVICE_TYPE_IPAD        =     0x80;                                //iPad

/////////////////////////////////////////////////////////////////////////////////
//手机定义

//视图模式
VIEW_MODE_ALL		=		0x0001;								//全部可视
VIEW_MODE_PART		=		0x0002;								//部分可视

//信息模式
VIEW_INFO_LEVEL_1		=	0x0010;								//部分信息
VIEW_INFO_LEVEL_2		=	0x0020;								//部分信息
VIEW_INFO_LEVEL_3		=	0x0040;								//部分信息
VIEW_INFO_LEVEL_4		=	0x0080;								//部分信息

//其他配置
RECVICE_GAME_CHAT		=	0x0100;								//接收聊天
RECVICE_ROOM_CHAT		=	0x0200;								//接收聊天
RECVICE_ROOM_WHISPER	=	0x0400;								//接收私聊

//行为标识
BEHAVIOR_LOGON_NORMAL     =  0x0000;                              //普通登录
BEHAVIOR_LOGON_IMMEDIATELY=  0x1000;                              //立即登录

/////////////////////////////////////////////////////////////////////////////////
//处理结果
RESULT_ERROR 			=		-1;  								    //处理错误
RESULT_SUCCESS 			=		0;  									//处理成功
RESULT_FAIL 			=		1;  									//处理失败

/////////////////////////////////////////////////////////////////////////////////

ServiceStatus_Unknow = 0;			//未知状态
ServiceStatus_Entering = 1;			//进入状态
ServiceStatus_Validate = 2;			//验证状态
ServiceStatus_RecvInfo = 3;			//读取状态
ServiceStatus_ServiceIng = 4;		//服务状态
ServiceStatus_NetworkDown = 5;		//中断状态

/////////////////////////////////////////////////////////////////////////////////
//无效数值
INVALID_BYTE = 0xFF;					//无效数值
INVALID_WORD = 0xFFFF;					//无效数值
INVALID_DWORD = 0xFFFFFFFF;				//无效数值

//扣费类型
MATCH_FEE_TYPE_GOLD = 0x00;             //扣费类型
MATCH_FEE_TYPE_MEDAL = 0x01;            //扣费类型

//比赛类型
MATCH_TYPE_LOCKTIME = 0x00;             //定时类型
MATCH_TYPE_IMMEDIATE = 0x01;            //即时类型

window.g_Socket =null;                  //网络对象
window.g_SocketID = 0;
window.g_ServerHeartTime = 0;           //服务器心跳时间
window.g_HeartStatTime = 0;             //服务器心跳时间
window.g_NetResponseTime = 0;           //服务器心跳时间
//用户属性
tagUserAttribute = cc.Class({
    ctor :function() {
        //用户属性
        this.dwUserID = 0;							                 //用户标识
        this.wTableID = 0;                                             //桌子号码
        this.wChairID = 0;                                             //椅子号码
        //权限属性
        this.dwUserRight = 0;                                         //用户权限
        this.dwMasterRight = 0;                                       //管理权限
    },

});

//游戏属性
tagGameAttribute = cc.Class({
    ctor :function () {
        this.wKindID = 0;							                 //类型标识
        this.wChairCount = 0;                                     //椅子数目
        this.dwClientVersion = 0;                                //游戏版本
        this.szGameName = "";                                    //游戏名字
        this.len_szGameName = LEN_KIND*cc.TCHAR_SIZE;                              //游戏名字
    },
});

//用户属性
tagUserAttrib = cc.Class({
    ctor :function () {
        this.cbCompanion = 0;							             //用户关系
    },
});

/////////////////////////////////////////////////////////////////////////////////

$_GET = (function(){
    if(cc.sys.isBrowser){
        var url = document.location.href.toString();
        var u = url.split("?");
        if(typeof(u[1]) == "string"){
            u = u[1].split("&");
            var get = {};
            for(var i in u){
                var j = u[i].split("=");
                get[j[0]] = j[1];
            }
            return get;
        } else {
            return {};
        }
    }
})();

function getQueryString(name) { //输入参数名称
    if(cc.sys.isBrowser){//
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); //根据参数格式，正则表达式解析参数

        var r = window.location.search.substr(1).match(reg);

        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
}

function pad(num, n) {
    var str = ''+num;
    while(str.length < n){
        str = '0'+str
    }
    return str;
}
function Time2Str(dwTime) {
    var rDate = new Date();
    rDate.setTime(dwTime * 1000);
    var str = rDate.getFullYear()+'-'+pad(rDate.getMonth()+1,2)+'-'+pad(rDate.getDate(),2);
    str += ' '+pad(rDate.getHours(), 2)+':'+pad(rDate.getMinutes(), 2)+':'+pad(rDate.getSeconds(), 2);
    return str;
}

function DifDay(time1, time2) {
    var rDate1 = new Date();
    rDate1.setTime(time1);
    var rDate2 = new Date();
    rDate2.setTime(time2);
    if(rDate1.getFullYear() != rDate2.getFullYear()) return true;
    if(rDate1.getMonth() != rDate2.getMonth()) return true;
    if(rDate1.getDate() != rDate2.getDate()) return true;
    return false;
}

function cutstr(str, len) {
    var str_length = 0;
    var str_cut = "";

    for (var i = 0; i < str.length; i++) {
        var a = str.charAt(i);
        str_cut += a;
        if (escape(a).length > 4) str_length+=2;//中文
        else str_length++;
        if (str_length + 1>= len*2 && str.length - i > 1) {
            str_cut = str_cut + "...";
            return str_cut;
        }
    }

    return str_cut;
}

function clone(obj) {
    if (null == obj || "object" != typeof obj) return obj;
    if (obj instanceof Date) {
        var copy = new Date();
        copy.setTime(obj.getTime());
        return copy;
    }
    if (obj instanceof Array) {
        var copy = [];
        var len = obj.length;
        for (var i = 0; i < len; ++i) {
            copy[i] = clone(obj[i]);
        }
        return copy;
    }
    if (obj instanceof Object) {
        var copy = {};
        for (var attr in obj) {
            if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
        }
        return copy;
    }
}

cc.game.on(cc.game.EVENT_HIDE, function(event){
    if(LOG_NET_DATA)console.log("切换后台");
    if (g_Table && g_Table.m_ServerItem &&　g_Table.m_ServerItem.mInterval == null) {
        g_Table.m_ServerItem.CloseSocket();
    }
});
cc.game.on(cc.game.EVENT_SHOW, function(event){
    if(LOG_NET_DATA)console.log("切换前台");
    try {
        //重连
        if (g_Table && g_Table.m_ServerItem && g_Table.m_ServerItem.mInterval == null){
            g_Table.OnGFServerReLink();
        }
        //刷新用户信息
        if(g_Lobby && g_Lobby.OnBtRefeshRoomCard){
            g_Lobby.OnBtRefeshRoomCard();
        }
    } catch (error) {
        console.log(error)
    }
});

//////////////////////////////////////////////////////////////////////////////////

// 登录
Key_LoginAcc = QPName + '_' + LOGIN_SERVER_IP + '_LoginAcc';
Key_LoginPsw = QPName + '_' + LOGIN_SERVER_IP + '_LoginPsw';
Key_LoginPswT = QPName + '_' + LOGIN_SERVER_IP + '_LoginPswT';
Key_LoginPlatfrom = QPName + '_' + LOGIN_SERVER_IP + '_LoginPlstfrom';
Key_PhoneCode = QPName + '_' + LOGIN_SERVER_IP + '_PhoneCode';
Key_PhoneCodeTime = QPName + '_' + LOGIN_SERVER_IP + '_PhoneCodeTime';

// 热更
HUversion = false; //Hot Update
Key_HotUpdateVer = QPName + '_' + LOGIN_SERVER_IP + '_VER';
Key_HotUpdate = QPName + '_' + LOGIN_SERVER_IP + '_sub_';

ShowGPS = QPName + 'SGPS';
ShareTime = QPName + '_Share';
AndroidBUG = 'NoHttps';

/////////////////////////////////////////////
CardColor  = 'CardBk';

Key_Setting_Head = QPName + '_' + LOGIN_SERVER_IP + '_';
Key_Lobby_BG = 'LobbyBG';
Key_Table_BG = 'TableBG';
Key_Table_BGM = 'TableBGM';
Key_Music = 'Music';
Key_Sound = 'Sound';
Key_Card_Color = 'CardColor';
Key_Card_Back = 'CardBack';
Key_Card_Shape = 'CardShape';
Key_Faces = 'Faces';
Key_Ting_Tip = 'TingTip';
Key_Chat = 'Chat';

g_SettingAttr = new Object();
g_SettingAttr[KindID_RF] = new Object();
g_SettingAttr[KindID_KWX] = new Object();

g_SettingAttr[KindID_RF][Key_Lobby_BG] = 0;
g_SettingAttr[KindID_RF][Key_Table_BG] = 0;
g_SettingAttr[KindID_RF][Key_Table_BGM] = 0;
g_SettingAttr[KindID_RF][Key_Music] = 1;
g_SettingAttr[KindID_RF][Key_Sound] = 1;
g_SettingAttr[KindID_RF][Key_Card_Color] = 0;
g_SettingAttr[KindID_RF][Key_Card_Back] = 0;
g_SettingAttr[KindID_RF][Key_Card_Shape] = 0;
g_SettingAttr[KindID_RF][Key_Faces] = 1;
g_SettingAttr[KindID_RF][Key_Ting_Tip] = 1;
g_SettingAttr[KindID_RF][Key_Chat] = 1;

g_SettingAttr[KindID_KWX][Key_Lobby_BG] = 0;
g_SettingAttr[KindID_KWX][Key_Table_BG] = 0;
g_SettingAttr[KindID_KWX][Key_Table_BGM] = 0;
g_SettingAttr[KindID_KWX][Key_Music] = 1;
g_SettingAttr[KindID_KWX][Key_Sound] = 1;
g_SettingAttr[KindID_KWX][Key_Card_Color] = 0;
g_SettingAttr[KindID_KWX][Key_Card_Back] = 0;
g_SettingAttr[KindID_KWX][Key_Card_Shape] = 0;
g_SettingAttr[KindID_KWX][Key_Faces] = 1;
g_SettingAttr[KindID_KWX][Key_Ting_Tip] = 1;
g_SettingAttr[KindID_KWX][Key_Chat] = 1;

function LoadSetting(wKindID) {
    if(!wKindID) return;

    var strName = Key_Setting_Head;
    if(wKindID) strName += wKindID + '_';
    var pGlobalUserData = g_GlobalUserInfo.GetGlobalUserData();
    strName += '['
    strName += (pGlobalUserData.dwUserID ? pGlobalUserData.dwUserID : '-');
    strName += ']_'
    for (var i in g_SettingAttr[wKindID]) {
        var res = cc.sys.localStorage.getItem(strName + i);
        if (res != null) g_SettingAttr[wKindID][i] = Number(res);
    }
}


function SetSetting(szKey, Value, wKindID) {
    if(!wKindID) return;

    if (typeof (g_SettingAttr[wKindID][szKey]) == 'undefined') return;
    g_SettingAttr[wKindID][szKey] = Value;
    var strName = Key_Setting_Head;
    if(wKindID) strName += wKindID + '_';
    var pGlobalUserData = g_GlobalUserInfo.GetGlobalUserData();
    strName += '['
    strName += (pGlobalUserData.dwUserID ? pGlobalUserData.dwUserID : '-');
    strName += ']_'
    strName += szKey;
    cc.sys.localStorage.setItem(strName, Value);
}

UpdateSetting = function (Key, wKindID) {
    if(!wKindID) return;
    LoadSetting();
    Value = g_SettingAttr[wKindID][Key];
    if (!Value) Value = 0;
    cc.log("=========UpdateSetting=============="+Key);
    switch (Key) {
        case Key_Lobby_BG: {
            var path = 'Textures/Picture/BGLogin' + Value;
            g_BGLobbySF = 'Loading';
            cc.loader.loadRes(path, cc.SpriteFrame, function (err, SpriteFrame) {
                if (err) {
                    cc.error("UpdateBGColor ==>> " + err);
                } else {
                    g_BGLobbySF = SpriteFrame;
                }
            });
            break;
        }
        case Key_Table_BG:
            if (!g_Table) break;
            var path = 'SubGame/' + GameDef.KIND_ID + '/Picture/BG' + Value;
            g_BGGameSF = 'Loading';
            cc.loader.loadRes(path, cc.SpriteFrame, function (err, SpriteFrame) {
                if (err) {
                    cc.error("UpdateBGColor ==>> " + err);
                } else {
                    g_BGGameSF = SpriteFrame;

                }
            });
            break;
        case Key_Table_BGM:
            if(g_Table) cc.gSoundRes.PlayMusic("BGM" + Value, false);
            break;
        case Key_Card_Color:
            if(g_Table) g_Table.UpdateSet();
            break;
        case Key_Card_Back:
            if(g_Table) g_Table.UpdateSet();
            break;
    }
}

//////////////////////////////////////////////////////////////////////////////////

function ChangeScene(szSceneName) {
    if(szSceneName == 'Login') window.JsNativeBridge.changeOrientationH(false, function(bChange){
        cc.director.loadScene('Login', null);
    });
    if(szSceneName == 'Lobby') window.JsNativeBridge.changeOrientationH(false, function(bChange) {
        cc.director.loadScene('Lobby', null);
    });
    if(szSceneName == 'Table') window.JsNativeBridge.changeOrientationH(true, function(bChange) {
        cc.director.loadScene('Table', null);
    });
};
//////////////////////////////////////////////////////////////////////////////////

